package z.sample.servicecommons.service;

import java.util.List;

import javax.jws.WebService;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import z.sample.servicecommons.dto.CustomerDTO;
import z.sample.servicecommons.dto.EmployeeDTO;
import z.sample.servicecommons.dto.OfficeDTO;

@WebService
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public interface DemoRSService {
	@GET
	@Path("/customer/all")
	public List<CustomerDTO> getAllCustomers();
	
	@GET
	@Path("/customer/find")
	public List<CustomerDTO> findCustomersByName(@QueryParam("name") String name);
	
	@GET
	@Path("/employee/all")
	public List<EmployeeDTO> getAllEmployees();
	
	@GET
	@Path("/office/all")
	public List<OfficeDTO> getAllOffices();
	
	@GET
	@Path("/customer/find/reporter")
	public List<CustomerDTO> getCustomerOfAReporter(@QueryParam("reportTo") Long reporterId);
}
